<?php
function express_status($status = null)
{
    $arr = [
        0 => "未发货",
        1 => "已发货",
    ];
    if ($status !== null) {
        return array_key_exists($status, $arr) ? $arr[$status] : $arr['0'];
    }
    return $arr;
}

function pub_status($status = null)
{
    $arr = [
        0 => "作废",
        1 => "未兑换",
        2 => "已兑换",
    ];
    if ($status !== null) {
        return array_key_exists($status, $arr) ? $arr[$status] : $arr['0'];
    }
    return $arr;
}

function express_type($status = null)
{
    $arr = [
        'shunfeng' => "顺丰速运",
        'kuayue' => "跨越速运",
        'zhongtong' => "中通快递",
    ];
    if ($status !== null) {
        return array_key_exists($status, $arr) ? $arr[$status] : $arr['0'];
    }
    return $arr;
}
